package com.wangsd.web.face.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wangsd.common.basicbean.Result;
import com.wangsd.web.face.entity.Merchant;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wangsd.web.face.entity.Receiver;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author generator
 * @since 2019-09-10
 */
public interface MerchantService extends IService<Merchant> {

    IPage<Merchant> selectList(Integer pageNum, Integer pageSize, Merchant params,String code);

    void addOrUpdate(Merchant params);

    List<Map> selectAllByUserCode(String code);

    List<Merchant> selectAllByCode(String code);

    List<Merchant> selectByCode(String code);


    Result delMerchantReceiver(Long merchantId, Long receiverId);

    List<Receiver> selectMerchantReceivers(Long id);

    Merchant selectByDeviceNo(String deviceNo);

    Integer selectCountByAgentId(Long id);

    /**
     * 通过小程序appid查询商户对应小程序的配置信息
     */
    Merchant selectByMiniAppId(String miniAppid);

    void addReceiver(Long merchantId, Long receiverId, Long drawTotalFee, Long minimumDraw, Long perDraw) throws Exception;
}
